-
-
Notifications
You must be signed in to change notification settings - Fork 50
Adding flac file format #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| static const value_pair fformat_values[] = {{"wav"},{"ogg"},{"w64"},{0}}; | ||
| static const value_pair fformat_values[] = {{"wav"},{"ogg"},{"w64"},{"flac"},{0}}; | ||
| if (channel == 1) { | ||
| reg.registerFloatVar("recorder.file","","S",N_("select file format"),&fformat, 0.0, 0.0, 2.0, 1.0, fformat_values); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. But didn't we need to change the max value for fformat to 3.0 in order to allow to select flac?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that what that's for?
Odldy enough it doesn't make a difference with what I tested (see attached image). But, it makes sense looking at what the registerFloatVar is supposed to do. I'm not sure these values are being validated anywhere otherwise I would have expected it to fail.
It applies to this line too:
reg.registerFloatVar("st_recorder.file","","S",N_("select file format"),&fformat, 0.0, 0.0, 2.0, 1.0, fformat_values);
Odldy enough it doesn't make a difference with what I tested. But, it makes sense looking at what the registerFloatVar is supposed to do.
I'll change these and commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW I have a few other changes that I've done for my own workflow - which may or may not be interesting for other people. Let me know if anything sounds interesting.
First, I'm saving the files as std::strftime(datetime, sizeof(datetime), "%Y%m%d-%H%M%S", now) + extension. This is because I use guitarix running on multiple machines (desktop, laptop and portable pi) and then when I go to combine the files (to listen to on my phone) the ones with the same index number and file format are overwritten with the old naming scheme.
The other is that I added Taglib as a requirement and I'm writing the bank:preset to the metadata comment tag. Which maybe is interesting for other people. Actually, I'm writing the bank:preset into the genre and album fields too and hard-coding a few others like artist so that I can see what setup I was using when I listen to the files on my phone with some players (auxio) I can sort by genre which I find handy. But, this is my workflow so maybe too specific.
This maybe shouldn't be required (although it seems that taglib seems to also be available for mac and windows) and maybe things like artist should be picked up from some external json file (maybe that's too much trouble - besides if people want to add tags there are other ways to do it).
Another is that I dump the pmap into a file with the the .txt extension, so that if something sounds particularly interesting I can reproduce the settings at a later date.
Maybe this would be handy but then as a setting it should be possible to turn this off.
…ables to reflect the addition of the flac file format
In the title. It looks like sndlib supports flac files out of the box. I haven't tested for windows or mac but doing a search, it looks like their versions of sndlib also support the flac format.